<template>
    <div class="box-group-wrap">
        <p class="title">
            <span style="width: 85%;">IVR轨迹</span>
        </p>
        <!-- <div class="line"></div> -->
        <div v-if="IVRList.length === 0" class="nodatalist">
            <img src="@/assets/img/khindex/nuMessage.png" alt width="40px" />
            <p>暂无IVR轨迹</p>
        </div>
        <div v-else class="ivrSty" v-for="(item, index) in IVRList" :key="index">{{item}}</div>
    </div>
</template>

<script>
import { mapGetters } from 'vuex';

export default {
    data() {
        return {
            IVRList: [],
        };
    },
    computed: {
        ...mapGetters([
            'currentSessionId',
        ]),
    },
    mounted() {
        console.log('top.softphone', top);
        if (top.softphone) {
            if (top.softphone.direction === 'in') { // 呼入
                this.IVRList = top.softphone.sessionData.ivrData.data.OPERATETRAJECT;
            } else if (top.softphone.direction === 'out') { // 外呼
                this.IVRList = [];
            }
        }

    },
    methods: {
    }
};
</script>

<style scoped>
.ivrSty {
    font-size: 12px;
    line-height: 24px;
}
</style>
